package org.example.thread;

public class MyThread1 extends Thread {
    public static void main(String[] args) {
        MyThread1 m1= new MyThread1();
        MyThread2 m2 = new MyThread2();
        m1.start();
        m2.start();
    }

    @Override
    public void run() {
        for(int i=1;i<=100;i++){
            System.out.println(Thread.currentThread().getName()+":"+i);
            Thread.yield();
        }
    }
}
